/*
 * @Description: 公用
 * @Author: Zzt
 * @Date: 2022-12-21 11:23:05
 * @LastEditTime: 2022-12-30 10:40:33
 */
import PageLayout from '@/layout/PageLayout';
import classNames from 'classnames/bind';
import PageContent from './components/PageContent';
import PageSidebar from './components/PageSidebar';
import { BusinessGuidanceContextProvider } from './contexts/BusinessGuidanceContext';
import { GuidanceTypeContext } from './contexts/GuidanceWaysContext';
import { EnumGuidanceWays } from './dictionaries';
import styles from './styles/BusinessGuidanceMain.module.scss';

const cx = classNames.bind(styles);
interface IBatchMgtProps {
  type: EnumGuidanceWays;
  title: string;
}

const BusinessGuidanceMain = (props: IBatchMgtProps) => {
  const { type, title } = props;
  console.log('type,title', type, title);

  return (
    <GuidanceTypeContext.Provider value={{ type, title }}>
      <BusinessGuidanceContextProvider>
        <PageLayout className="flow-mgt" sidebar={<PageSidebar />}>
          <PageContent />
        </PageLayout>
      </BusinessGuidanceContextProvider>
    </GuidanceTypeContext.Provider>
  );
};
export default BusinessGuidanceMain;
